package com.anti.modular.bus.busroom.service;

import com.anti.jdbc.support.page.PageParam;
import com.anti.jdbc.support.page.PageResult;
import com.anti.modular.bus.busrealestate.result.BusRoomResult;
import com.anti.modular.bus.busrealestate.result.RoomRentDesResult;
import com.anti.modular.bus.busrealestate.result.RoomType;
import com.anti.modular.bus.busrealestate.result.tree.BusRoomTreeRes;
import com.anti.modular.bus.busrealestate.result.tree.RoomListResult;
import com.anti.modular.bus.busroom.entity.BusRoom;
import com.anti.modular.bus.busroom.param.BusRoomParam;

import java.util.List;

/**
 * 房间表service接口
 *
 * @author anti
 * @date 2021-04-16 19:14:02
 */
public interface BusRoomService{

    /**
    * 根据主键查询实体
    */
    BusRoom getById(BusRoomParam busRoomParam);

    BusRoom getByLeaseId(Long id);

    List<BusRoomResult> getByIds(List<Long> ids, String searchType, String searchValue);

    List<BusRoom> getByFloorIds(List<Long> ids);
    List<BusRoomTreeRes> getBusRoomTreeResFloorIds(List<Long> ids);

    /**
     *
     * @param fcId 房產id
     * @param type 類型
     * @return
     */
    int getRoomCount(Long fcId,String type);

    /**
     *
     * @param fcId 房產id
     * @param type 類型
     * @return
     */
    int getRoomRentCount(Long fcId,String type);

    int getRoomRentCountByFloorId(Long floorId);

    List<RoomType> getRoomTypeByStateId(Long floorId, String type);

    /**
     * 獲取總租金縂押金根據房產
     * @param stateId
     * @return
     */
    RoomRentDesResult getAllRentDes(Long stateId,String type);

    List<BusRoom> getRoomByStateId(Long stateId, String type);

    List<BusRoom> getRoomByStateId(Long stateId);

    List<BusRoomTreeRes> getBusRoomTreeResByStateId();
    /**
     * 查询房间表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
    PageResult page(PageParam pageParam,BusRoomParam busRoomParam);

    /**
     * 房间表列表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
    List<BusRoom> list(BusRoomParam busRoomParam);

    List<RoomListResult> getRoomListByEstateIdOnOwnerType(Long estateId,String name,int category);

    /**
     * 添加房间表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
    void add(BusRoomParam busRoomParam);

    /**
     * 删除房间表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
    void delete(BusRoomParam busRoomParam);

    /**
     * 编辑房间表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
    void edit(BusRoomParam busRoomParam);

    /**
     * 业主租约房间绑定
     * @param roomId
     * @param ownerId
     */
    void editByOwnerZy(Long roomId,Long ownerId);

    /**
     * 業主租約解除綁定
     * @param ownerLeaseId
     */
    void editByOwnerJc(Long ownerLeaseId);

    /**
     * 查看房间表
     *
     * @author anti
     * @date 2021-04-16 19:14:02
     */
     BusRoom detail(BusRoomParam busRoomParam);

    int getRentRoomNumByFzId(Long fcId);

    int getRentRoomNumByFloorId(Long fcId);

    int getRentRoomNumByRoomId(Long fcId);

    void deleteByFcId(Long id);

    void deleteRoomByStateId(Long id);

    void deleteRoomByFloorId(Long stateId,Long floorId);
}
